Optimal. Leaf size=38 \[ -\frac{\tan (c+d x)}{a^2 d}+\frac{2 i \log (\cos (c+d x))}{a^2 d}+\frac{2 x}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0487313, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3487, 43} \[ -\frac{\tan (c+d x)}{a^2 d}+\frac{2 i \log (\cos (c+d x))}{a^2 d}+\frac{2 x}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3487
Rule 43
Rubi steps
\begin{align*} \int \frac{\sec ^4(c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=-\frac{i \operatorname{Subst}\left (\int \frac{a-x}{a+x} \, dx,x,i a \tan (c+d x)\right )}{a^3 d}\\ &=-\frac{i \operatorname{Subst}\left (\int \left (-1+\frac{2 a}{a+x}\right ) \, dx,x,i a \tan (c+d x)\right )}{a^3 d}\\ &=\frac{2 x}{a^2}+\frac{2 i \log (\cos (c+d x))}{a^2 d}-\frac{\tan (c+d x)}{a^2 d}\\ \end{align*}
Mathematica [A] time = 0.365947, size = 71, normalized size = 1.87 \[ \frac{4 \tan ^{-1}(\tan (d x))+i \sec (c) \sec (c+d x) \left (\cos (d x) \log \left (\cos ^2(c+d x)\right )+\cos (2 c+d x) \log \left (\cos ^2(c+d x)\right )+2 i \sin (d x)\right )}{2 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.063, size = 35, normalized size = 0.9 \begin{align*}{\frac{-2\,i\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{{a}^{2}d}}-{\frac{\tan \left ( dx+c \right ) }{{a}^{2}d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.962078, size = 43, normalized size = 1.13 \begin{align*} \frac{-\frac{2 i \, \log \left (i \, \tan \left (d x + c\right ) + 1\right )}{a^{2}} - \frac{\tan \left (d x + c\right )}{a^{2}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.36921, size = 192, normalized size = 5.05 \begin{align*} \frac{4 \, d x e^{\left (2 i \, d x + 2 i \, c\right )} + 4 \, d x +{\left (2 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 2 i\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 2 i}{a^{2} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.2018, size = 138, normalized size = 3.63 \begin{align*} \frac{2 \,{\left (-\frac{2 i \, \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}{a^{2}} + \frac{i \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} + \frac{i \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac{-i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )} a^{2}}\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]